﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="MateReceiptReport.aspx.cs" Inherits="Reports_MateReceiptReport" Title="尾纸统计表" culture="auto" meta:resourcekey="PageResource3" uiculture="auto" %>

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="myDiv" runat="server" class="divBgCover">
    </div>
    <div id="divError" runat="server" class="blue divActiveWindow">
        <table width="100%" align="center">
            <tr>
                <td>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <div class="title">
                                <asp:Label ID="Label2" runat="server" Text="客户信息列表" 
                                    meta:resourcekey="Label2Resource1"></asp:Label></div>
                            <table class="add_table" cellspacing="1" cellpadding="3">
                                <tr>
                                    <td align="right">
                                        <asp:DropDownList ID="ddlColumnName" runat="server" 
                                            meta:resourcekey="ddlColumnNameResource1">
                                            <asp:ListItem Text="客户代码" Value="Code" meta:resourcekey="ListItemResource1"></asp:ListItem>
                                            <asp:ListItem Text="公司中文名" Value="CNName" meta:resourcekey="ListItemResource2"></asp:ListItem>
                                            <asp:ListItem Text="公司英文名" Value="ENGName" meta:resourcekey="ListItemResource3"></asp:ListItem>
                                            <asp:ListItem Text="公司台头" Value="Title" meta:resourcekey="ListItemResource4"></asp:ListItem>
                                            <asp:ListItem Text="公司业务员" Value="LocalBP" meta:resourcekey="ListItemResource5"></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtName" runat="server" meta:resourcekey="txtNameResource1"></asp:TextBox>
                                    </td>
                                    <td>
                                        <asp:Button ID="btnShipperSel" runat="server" CssClass="btn" Text="搜索" 
                                            OnClick="btnShipperSel_Click" meta:resourcekey="btnShipperSelResource1" />
                                    </td>
                                </tr>
                            </table>
                            <div id="divEntrust" runat="server">
                                <div class="list_title">
                                    <div class="autoleft">
                                        <asp:Label ID="lblSelectOut" runat="server" Text="检索出" 
                                            meta:resourcekey="lblSelectOutResource1"></asp:Label>
                                        <asp:Label ID="lblTotal"
                                            runat="server" meta:resourcekey="lblTotalResource1"></asp:Label>
                                        <asp:Label ID="lblSelectOut2" runat="server" Text="个托运人" 
                                            meta:resourcekey="lblSelectOut2Resource1"></asp:Label></div>
                                    <div class="autoright">
                                        <asp:Label ID="lblPerPage" runat="server" Text="每页显示：" 
                                            meta:resourcekey="lblPerPageResource1"></asp:Label>
                                        <asp:DropDownList ID="ddlPages" runat="server" AutoPostBack="True" 
                                            OnSelectedIndexChanged="ddlPages_SelectedIndexChanged" 
                                            meta:resourcekey="ddlPagesResource1">
                                            <asp:ListItem Selected="True" Text="10" Value="10" 
                                                meta:resourcekey="ListItemResource6"></asp:ListItem>
                                            <asp:ListItem Text="15" Value="15" meta:resourcekey="ListItemResource7"></asp:ListItem>
                                        </asp:DropDownList>
                                    </div>
                                </div>
                                <asp:GridView ID="gvClientList" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                    Width="100%" AllowSorting="True" OnPageIndexChanging="gvClientList_PageIndexChanging"
                                    OnSorting="gvClientList_Sorting" meta:resourcekey="gvClientListResource1">
                                    <PagerTemplate>
                                        <table style="width: 100%">
                                            <tr>
                                                <td>
                                                    <asp:Label ID="lblPerPage" runat="server" Text="页次" 
                                                        meta:resourcekey="lblPerPageResource2"></asp:Label>:&nbsp;<asp:Label
                                                        ID="Label1" runat="server" 
                                                        Text='<%# ((GridView)Container.Parent.Parent).PageIndex+1 %>' 
                                                        meta:resourcekey="Label1Resource1"></asp:Label>/<asp:Label
                                                            ID="Label2" runat="server" 
                                                        Text='<%# ((GridView)Container.Parent.Parent).PageCount %>' 
                                                        meta:resourcekey="Label2Resource2"></asp:Label><asp:Label
                                                                ID="lblPage" runat="server" Text="页" 
                                                        meta:resourcekey="lblPageResource1"></asp:Label>&nbsp;
                                                    <asp:Label ID="lblTotalPages" runat="server" Text="总计" 
                                                        meta:resourcekey="lblTotalPagesResource1"></asp:Label>:&nbsp;<asp:Label
                                                        ID="Label3" runat="server" 
                                                        Text="<%# ((System.Data.DataView)gvClientList.DataSource).Count %>" 
                                                        meta:resourcekey="Label3Resource1"></asp:Label>
                                                </td>
                                                <td align="right">
                                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Page" CommandArgument="First"
                                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                                        Text="首页" meta:resourcekey="LinkButton1Resource1"></asp:LinkButton>
                                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="Prev" CommandName="Page"
                                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=0 %>" 
                                                        Text="前页" meta:resourcekey="LinkButton2Resource1"></asp:LinkButton>
                                                    <asp:LinkButton ID="LinkButton3" runat="server" CommandName="Page" CommandArgument="Next"
                                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                                        Text="后页" meta:resourcekey="LinkButton3Resource1"></asp:LinkButton>
                                                    <asp:LinkButton ID="LinkButton4" runat="server" CommandArgument="Last" CommandName="Page"
                                                        Enabled="<%# ((GridView)Container.Parent.Parent).PageIndex!=((GridView)Container.Parent.Parent).PageCount-1 %>"
                                                        Text="尾页" meta:resourcekey="LinkButton4Resource1"></asp:LinkButton>&nbsp;
                                                    <asp:Label ID="lblTurnOn" runat="server" Text="转第" 
                                                        meta:resourcekey="lblTurnOnResource1"></asp:Label>
                                                    <asp:TextBox ID="txtPages"
                                                        runat="server" Width="35px" meta:resourcekey="txtPagesResource1"></asp:TextBox>
                                                    <asp:Label ID="lblPages2" runat="server" Text="页" 
                                                        meta:resourcekey="lblPages2Resource1"></asp:Label>
                                                    <asp:LinkButton ID="lbtnGo" runat="server" Text="提交" OnClick="lbtnGo_Click" 
                                                        meta:resourcekey="lbtnGoResource1"></asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </PagerTemplate>
                                    <Columns>
                                        <asp:TemplateField HeaderText="选择" meta:resourcekey="TemplateFieldResource1">
                                            <ItemTemplate>
                                                <input type="radio" name="chkSelected" 
                                                    value='<%# DataBinder.Eval(Container.DataItem,"PKID") %>' />
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="客户代码" SortExpression="Code" 
                                            meta:resourcekey="TemplateFieldResource2">
                                            <ItemTemplate>
                                                <asp:Label ID="lblCodes" runat="server" Text='<%# Eval("Code") %>' 
                                                    meta:resourcekey="lblCodesResource1"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="公司简称(中文)" SortExpression="CNName" 
                                            meta:resourcekey="TemplateFieldResource3">
                                            <ItemTemplate>
                                                <asp:Label ID="lblCNName" runat="server" Text='<%# Eval("CNName") %>' 
                                                    meta:resourcekey="lblCNNameResource1"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="公司简称(英文)" SortExpression="ENGName" 
                                            meta:resourcekey="TemplateFieldResource4">
                                            <ItemTemplate>
                                                <asp:Label ID="lblENGName" runat="server" Text='<%# Eval("ENGName") %>' 
                                                    meta:resourcekey="lblENGNameResource1"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                        <asp:TemplateField HeaderText="业务员" SortExpression="LocalBP" 
                                            meta:resourcekey="TemplateFieldResource5">
                                            <ItemTemplate>
                                                <asp:Label ID="lblType" runat="server" Text='<%# Eval("LocalBP") %>' 
                                                    meta:resourcekey="lblTypeResource1"></asp:Label>
                                            </ItemTemplate>
                                        </asp:TemplateField>
                                    </Columns>
                                    <HeaderStyle HorizontalAlign="Center" />
                                    <PagerSettings Mode="NumericFirstLast" />
                                    <RowStyle HorizontalAlign="Center" />
                                </asp:GridView>
                            </div>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnShipperSel" EventName="Click" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:Button ID="btnSub" runat="server" Text="提交" CssClass="btn" 
                        OnClick="btnSub_Click" meta:resourcekey="btnSubResource1" />&nbsp;&nbsp;<asp:Button
                        ID="btnClose" CssClass="btn" runat="server" Text="返回" 
                        OnClick="btnClose_Click" meta:resourcekey="btnCloseResource1" />
                    <asp:HiddenField ID="hidAdminID" runat="server" />
                </td>
            </tr>
            <tr>
                <td align="center">
                    <asp:Label ID="lblError" runat="server" Visible="False" Text="请选择一个托运人!" 
                        ForeColor="Red" meta:resourcekey="lblErrorResource1"></asp:Label>
                </td>
            </tr>
        </table>
    </div>
    <div class="title">
        <asp:Label ID="lblTitle" runat="server" Text="尾纸统计表" 
            meta:resourcekey="lblTitleResource1"></asp:Label></div>
    <table class="add_table" cellspacing="1" cellpadding="3" style="width: 100%">
        <tr>
            <td align="right">
                <asp:Label ID="lblMateReceiptDate" runat="server" Text="尾纸日期：" 
                    meta:resourcekey="lblMateReceiptDateResource1"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtMateReceiptDateFrom" runat="server" Width="20%" 
                    onkeydown="return pdDate(this,event);" 
                    meta:resourcekey="txtMateReceiptDateFromResource1"></asp:TextBox>-
                <asp:TextBox ID="txtMateReceiptDateTo" runat="server" Width="20%" 
                    onkeydown="return pdDate(this,event);" 
                    meta:resourcekey="txtMateReceiptDateToResource1"></asp:TextBox>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator11" runat="server"
                    ControlToValidate="txtMateReceiptDateFrom" ValidationGroup="JobList" ErrorMessage="日期格式不正确"
                    
                    ValidationExpression="((1[89]\d{2})|([2-8]\d{3}))[-](([1][012])|(0{1}[1-9]))[-]((3[01])|([12]\d)|(0{1}[1-9]))" 
                    meta:resourcekey="RegularExpressionValidator11Resource1"></asp:RegularExpressionValidator>
                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtMateReceiptDateTo"
                    ValidationGroup="JobList" ErrorMessage="日期格式不正确" 
                    ValidationExpression="((1[89]\d{2})|([2-8]\d{3}))[-](([1][012])|(0{1}[1-9]))[-]((3[01])|([12]\d)|(0{1}[1-9]))" 
                    meta:resourcekey="RegularExpressionValidator1Resource1"></asp:RegularExpressionValidator>
            </td>
            <td align="right">
                <asp:Label ID="lblShipperName" runat="server" Text="托运人 ：" 
                    meta:resourcekey="lblShipperNameResource1"></asp:Label>
            </td>
            <td>
                <table width="100%">
                            <tr>
                                <td rowspan="6" align="center">
                                    <asp:ListBox ID="lstShipper" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstShipperResource1" />
                                    <cc1:ListSearchExtender ID="ListSearchExtender2" runat="server" TargetControlID="lstShipper"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                                <td style="height: 2px">
                                </td>
                                <td rowspan="6" align="left">
                                    <asp:ListBox ID="lstSelShipper" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstSelShipperResource1">
                                    </asp:ListBox>
                                    <cc1:ListSearchExtender ID="ListSearchExtender4" runat="server" TargetControlID="lstSelShipper"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnAdd" runat="server" CssClass="btn" Text="添加" 
                                        onclick="btnAdd_Click" meta:resourcekey="btnAddResource1" />
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnDelete" runat="server" CssClass="btn" Text="刪除" 
                                        onclick="btnDelete_Click" meta:resourcekey="btnDeleteResource1" />
                                    <br />
                                </td>
                            </tr>
                        </table>
                <asp:HiddenField ID="hidClientID" runat="server" />
                <asp:TextBox ID="txtshipperName" runat="server" Enabled="False" Visible="False" 
                    meta:resourcekey="txtshipperNameResource1"></asp:TextBox><asp:LinkButton
                    ID="lbtnSelect" runat="server" OnClick="lbtnSelect_Click" Text="选择" 
                    Visible="False" meta:resourcekey="lbtnSelectResource1"></asp:LinkButton>
            </td>
           <%-- <td align="right">
            <asp:Label ID="lblCustomerName" runat="server"></asp:Label>
            </td>--%>       
            
            </tr>
            <tr>
           <%-- <td align="right"><asp:Label ID="lblCustomers" runat="server" Text="客户："></asp:Label></td>
              <td>
                <table width="100%">
                            <tr>
                                <td rowspan="6" align="center">
                                    <asp:ListBox ID="lstCustomer" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstlstCustomerResource1" />
                                    <cc1:ListSearchExtender ID="ListSearchExtenderCustomer" runat="server" TargetControlID="lstCustomer"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                                <td style="height: 2px">
                                </td>
                                <td rowspan="6" align="left">
                                    <asp:ListBox ID="lstSelCustomer" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstSelShipperResource1">
                                    </asp:ListBox>
                                    <cc1:ListSearchExtender ID="ListSearchExtender3" runat="server" TargetControlID="lstSelCustomer"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnCustomerAdd" runat="server" CssClass="btn" Text="添加" 
                                        onclick="btnCustomerAdd_Click" meta:resourcekey="btnCustomerAddResource1" />
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnCustomerDel" runat="server" CssClass="btn" Text="刪除" 
                                        onclick="btnCustomerDel_Click" meta:resourcekey="btnCustomerDelResource1" />
                                    <br />
                                </td>
                            </tr>
                        </table>                
            </td>--%>
            <td align="right"><asp:Label ID="lblVendors" runat="server" Text="工厂：" 
                    meta:resourcekey="lblVendorsResource1"></asp:Label></td>
            <td>
                <table width="100%">
                            <tr>
                                <td rowspan="6" align="center">
                                    <asp:ListBox ID="lstVendor" runat="server" Width="200px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstVendorResource1" />
                                    <cc1:ListSearchExtender ID="ListSearchExtenderlstVendor" runat="server" TargetControlID="lstVendor"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                                <td style="height: 2px">
                                </td>
                                <td rowspan="6" align="left">
                                    <asp:ListBox ID="lstSelVendor" runat="server" Width="200px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstSelVendorResource1">
                                    </asp:ListBox>
                                    <cc1:ListSearchExtender ID="ListSearchExtenderlstSelVendor" runat="server" TargetControlID="lstSelVendor"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnVendorAdd" runat="server" CssClass="btn" Text="添加" 
                                        onclick="btnVendorAdd_Click" meta:resourcekey="btnVendorAddResource1" />
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnVendorDel" runat="server" CssClass="btn" Text="刪除" 
                                        onclick="btnVendorDel_Click" meta:resourcekey="btnVendorDelResource1" />
                                    <br />
                                </td>
                            </tr>
                        </table>
            </td>
             <td align="right"><asp:Label ID="lblWhses" runat="server" Text="仓库：" 
                     meta:resourcekey="lblWhsesResource1"></asp:Label></td>
            <td>
              <table width="100%">
                            <tr>
                                <td rowspan="6" align="center">
                                    <asp:ListBox ID="lstWhse" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstWhseResource1" />
                                    <cc1:ListSearchExtender ID="ListSearchExtenderlstWhse" runat="server" TargetControlID="lstWhse"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                                <td style="height: 2px">
                                </td>
                                <td rowspan="6" align="left">
                                    <asp:ListBox ID="lstSelWhse" runat="server" Width="100px" 
                                        SelectionMode="Multiple" meta:resourcekey="lstSelWhseResource1">
                                    </asp:ListBox>
                                    <cc1:ListSearchExtender ID="ListSearchExtenderlstSelWhse" runat="server" TargetControlID="lstSelWhse"
                                        PromptCssClass="ListSearchExtenderPrompt" Enabled="True">
                                    </cc1:ListSearchExtender>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnWhseAdd" runat="server" CssClass="btn" Text="添加" 
                                        onclick="btnWhseAdd_Click" meta:resourcekey="btnWhseAddResource1" />
                                    <br />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button ID="btnWhseDel" runat="server" CssClass="btn" Text="刪除" 
                                        onclick="btnWhseDel_Click" meta:resourcekey="btnWhseDelResource1" />
                                    <br />
                                </td>
                            </tr>
                        </table>  
            </td>
            </tr>
            <tr>   
            <td colspan="4" align="center">
                <asp:Button ID="btnSearch" runat="server" CssClass="btn" Text="查询" 
                    OnClick="btnSearch_Click" meta:resourcekey="btnSearchResource1" />&nbsp;
                     <asp:Button ID="btnEmail" runat="server" Text="Email" CssClass="btn" onclick="btnEmail_Click" />
            </td>
        </tr>
    </table>
    <div style="width: 100%; height: 100%;" runat="server" id="divReport">
        <rsweb:ReportViewer ID="rptViewer" runat="server" Width="100%" Height="700px" 
            Font-Names="Verdana" Font-Size="8pt" meta:resourcekey="rptViewerResource1">
        </rsweb:ReportViewer>
        <asp:Label ID="lblNoRecord" runat="server" Text="没有找到记录" Visible="False" 
            meta:resourcekey="lblNoRecordResource1"></asp:Label>
    </div>
</asp:Content>
